package com.wd.myhome.viewmodel

import android.widget.Toast
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelStore
import com.google.android.exoplayer2.util.Log
import com.wd.current.model.Bean.DataBean
import com.wd.current.model.Utils.HttpUtils
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlin.math.log

/**
 * 作者: 张智聪
 * 时间: 2024/10/16
Time:  9:55
 * 描述:
 */
class HomeViewModel :ViewModel(){
    var liveListBean=MutableLiveData<DataBean.HomeList>()
    fun getList(userId: Int,
                liveType: Int,
                page: Int,
                size: Int,)
    {
HttpUtils.httpUtils.aplis2.getHomeList(userId,liveType,page,size)
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({
        liveListBean.value=it
        Log.i("aaaaaaa",it.result.toString())
    },{
        Log.i("httphttp11111111111111",it.toString())
    })

 }


}